import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    caca: false, //判断是否显示登录框
   //toast组件的提示信息
    toasMsg: '生日快乐',
    //提升是否显示 toast组件
    isShowToast: false,
     //提升组件的默认图标
    toasIcon: 'icon-toast_chenggong',
    
  },
  mutations: {
    //登入款的显示和隐藏
    Yinchan(state,pay) {
      state.caca=pay
    },
    showToast(state, payload) {
      state.isShowToast=true
      state.toasMsg=payload.msg
      state.toasIcon=payload.type
    },
    hideToast(state) {
      state.isShowToast=false
    }
  },
  actions: {
  },
  modules: {
  }
})
